/**
 * Created by Administrator on 2017/3/2 0002.
 */
var Page1={
    create:function () {
    var page={};
        page.ui=new PIXI.DisplayObjectContainer();

        var ob=Easy.CreateJSONGroup(json_group1,page.ui);
        for(var i in ob)
        {
            if(ob[i]!=ob.p1_bg)
            {
                ob[i].alpha=0;
                ob[i].orignY=ob[i].y;
                ob[i].y+=40;

            }
        }
        page.ui.addChild(ob.p1_t1);
        page.ui.addChild(ob.p1_t0);

        page.ui.addChild(ob.p1_t2);
        page.ui.addChild(ob.p1_t3);
        page.ui.addChild(ob.p1_t4);
        page.ui.addChild(ob.p1_t5);
        page.ui.addChild(ob.p1_t6);
        page.ui.addChild(ob.p1_t7);

        page.In=function () {
            console.log('in');
            volumeChange(1);
            ob.p1_bg.alpha=0;
            TweenMax.to(ob.p1_bg,1,{alpha:1});
            TweenMax.to(ob.p1_t0,1,{delay:0.2*0,alpha:1,y:ob.p1_t0.orignY,ease:Cubic.easeInOut});
            TweenMax.to(ob.p1_t1,1,{delay:0.2*1,alpha:1,y:ob.p1_t1.orignY,ease:Cubic.easeInOut});
            TweenMax.to(ob.p1_t2,1,{delay:0.2*2,alpha:1,y:ob.p1_t2.orignY,ease:Cubic.easeInOut});
            TweenMax.to(ob.p1_t3,1,{delay:0.2*3,alpha:1,y:ob.p1_t3.orignY,ease:Cubic.easeInOut});
            TweenMax.to(ob.p1_t4,1,{delay:0.2*4,alpha:1,y:ob.p1_t4.orignY,ease:Cubic.easeInOut});
            TweenMax.to(ob.p1_t5,1,{delay:0.2*4,alpha:1,y:ob.p1_t5.orignY,ease:Cubic.easeInOut});
            TweenMax.to(ob.p1_t6,1,{delay:0.2*4,alpha:1,y:ob.p1_t6.orignY,ease:Cubic.easeInOut});

            setTimeout(function () {
                page.ui.interactive=true;
            },2000)
        }
        page.Out=function () {
            console.log('out');
        }

         return page;
    }
}